<template>
  <div id="app">
    <div id="nav">
      <router-link to="/user">用户信息</router-link>
      <router-link to="/about">书籍信息</router-link>
    </div>
    <router-view/>
  </div>
</template>

<script>
export default {

  data(){
    return{

    }
  }
  ,
  created(){
    if(!$Cookies.get("adminId")){
      this.$router.push("/login")
    }
  }
}
</script>

<style lang="less">
html,body{
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  

}
#app{
  width: 100%;
  height: 100%;
  #nav{
    width: 100%;
    height: 30px;
    background-color:#3e3d43 ;
   
    color: #fff;
    line-height: 30px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    a{
      color: #fff;
      text-decoration: none;
      display: inline-block;
      height: 100%;
      width: 100px;
      text-align: center;
      overflow: hidden;
      
    }
    a:hover{
      background-color: black;
      border-top: 2px solid #f60;
    }
    .router-link-active{
      background-color: black;
    }
    
  }
}

</style>
